1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a printing apparatus.
2. Description of the Related Art
When an input image obtained from a digital still camera or the like is a so-called backlight image in which a portion of an image area is dark and a peripheral portion of the dark portion is bright, backlight correction is performed for the input image. As a technique regarding backlight correction, an image processing apparatus is known which performs brightness correction. In this case, the brightness correction is performed by determining whether or not a captured image is a backlight human image, when the captured image is a backlight human image, acquiring the luminance average value of flesh color pixels from among all the pixels constituting the image, obtaining a tone curve in which an output value when the average value is used as an input value becomes a predetermined value FV, and applying the tone curve to the luminance value or the R, G, and B values of each pixel of the image (see JP-A-2004-341889).
The backlight correction of the related art has the following problems.
As described above, the tone curve for backlight correction is determined on the basis of the relationship between the luminance average value of the flesh color pixels substantially corresponding to the human image and a prescribed ideal value (predetermined value FV). For this reason, if the input image is corrected by the tone curve, the brightness of the human image which was intrinsically dark appropriately increases to some extent. However, the tone curve is determined without taking the state of the intrinsically bright portion in the backlight image into consideration. Accordingly, if the tone curve is applied, the bright portion (for example, the background of the human image or the like) is excessively corrected. Excessive correction may put the bright portion in a stark white state (whiteout state). That is, the backlight correction of the related art may cause whiteout of the bright portion in the backlight image.
Even if backlight correction is performed for the input image, the color balance in the input image may be broken. That is, in obtaining a high-quality image, it is necessary to appropriately perform a plurality of kinds of correction including backlight correction while taking the mutual influence of correction into consideration.